<?php

/*
 * File  : content.php
 * Table : null
 */
session_start();
//cek session

if ((!$_SESSION["USRID"] AND !$_SESSION["USRPASS"])) {
    header("location: index.php");
    exit();
}
//end
?>

<?php

// untuk home
if ($_GET["module"] == "home") {
    echo "<h2>Selamat Datang</h2>";
    echo "<p>Hai <b>" . $_SESSION["USRNAME"] . " </b>, selamat datang di halaman User.</p>
          <p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>
          <p style=\" float:left; \">Latest Login " . get_format_waktu_full($_SESSION["USRLOGIN"]) . "</p> <p style=\" float:right; \">Login : $hari_ini, ";
    echo tgl_indo(date("Y m d"));
    echo " | ";
    echo date("H:i:s");
    echo " WIB</p>";


// untuk user 
} elseif ($_GET["module"] == "users") {
    if ($_SESSION["USRLEVEL"] == "admin") {
        include "bab/m_users/users.php";
    }
    

// untuk modul
} elseif ($_GET["module"] == "modul") {
    if ($_SESSION["USRLEVEL"] == "admin") {
        include "bab/m_moduls/modul.php";
    }

// untuk kategori
} elseif ($_GET["module"] == "kategori") {
    if ($_SESSION["USRLEVEL"] == "admin") {
        include "bab/m_kategoris/kategori.php";
    }

// untuk produk
} elseif ($_GET["module"] == "produk") {
    include "bab/m_produks/produk.php";

// untuk ongkir
} elseif ($_GET["module"] == "ongkir") {
    include "bab/m_ongkirs/ongkir.php";

// untuk Berita
} elseif ($_GET["module"] == "guest") {
    include "bab/m_guest/guest.php";

// untuk profile
} elseif ($_GET["module"] == "statik") {
    include "bab/m_statik/statik.php";
//Transaksi di admin
} elseif ($_GET["module"] == "trans") {
    include "bab/m_transaksi/transaksi.php";
    
} elseif ($_GET["module"] == "report") {
    include "bab/m_laporan/laporan.php";

// untuk yang mana    
} else {
    echo "<p>ga tau mau kmn..</p>";
}
?>
